//
//  EditUserInfoManager.m
//  JPWords
//
//  Created by 梁淑婷 on 2024/6/13.
//

#import "EditUserInfoManager.h"

@implementation EditUserInfoManager

- (NSString *)methodName{
    return @"/auth/app/user";
}

- (JPAPIManagerRequestType)requestType{
    return JPAPIManagerRequestTypePOST;
}

#pragma mark - JPAPIManagerParamSource
- (NSDictionary *)paramsForApi:(JPAPIBaseManager *)manager{
    NSMutableDictionary *dict = @{}.mutableCopy;
    dict[@"userId"] = self.userId;
    if(self.nickname&&![self.nickname isEqualToString:@""]){
        dict[@"nickname"] = self.nickname;
    }
    if(self.sex&&![self.sex isEqualToString:@""]){
        dict[@"sex"] = self.sex;
    }
    if(self.avatar&&![self.avatar isEqualToString:@""]){
        dict[@"avatar"] = self.avatar;
    }
    if(self.introduction){
        dict[@"introduction"] = self.introduction;
    }
    if(self.downTime&&![self.downTime isEqualToString:@""]){
        dict[@"downTime"] = self.downTime;
    }
    if(self.downTimeName&&![self.downTimeName isEqualToString:@""]){
        dict[@"downTimeName"] = self.downTimeName;
    }
    if(self.wordNumber&&![self.wordNumber isEqualToString:@""]){
        dict[@"wordNumber"] = self.wordNumber;
    }
    if(self.mode&&![self.mode isEqualToString:@""]){
        dict[@"mode"] = self.mode;
    }
    return dict;
}
@end
